package ceshi.ceshiyixia.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import ceshi.ceshiyixia.model.User;
import ceshi.ceshiyixia.service.UserService;

@Controller
@RequestMapping("/ceshi")
public class wanwanController {

	@Autowired
	UserService userService;
	@RequestMapping("/ceshi2/{id}")
	@ResponseBody
	public User ceshi(@PathVariable("id")String id){
		return userService.findById(id);
	}
}
